<template>
  <div class="header-wrapper">
    <div class="hw-left">
      <div class="l-logo">
        <img src="@/assets/logo.png" alt="">
      </div>
      <div class="l-menu">
        <el-menu :default-active="activeIndex" class="el-menu-demo" mode="horizontal" @select="handleSelect">
          <el-menu-item index="1">首页</el-menu-item>
          <el-sub-menu index="2">
            <template #title>应用场景</template>
            <el-menu-item index="2-1">item one</el-menu-item>
            <el-menu-item index="2-2">item two</el-menu-item>
            <el-menu-item index="2-3">item three</el-menu-item>
            <!-- <el-sub-menu index="2-4">
              <template #title>item four</template>
              <el-menu-item index="2-4-1">item one</el-menu-item>
              <el-menu-item index="2-4-2">item two</el-menu-item>
              <el-menu-item index="2-4-3">item three</el-menu-item>
            </el-sub-menu> -->
          </el-sub-menu>
          <el-sub-menu index="3">
            <template #title>行业细分</template>
            <el-menu-item index="3-1">item one</el-menu-item>
            <el-menu-item index="3-2">item two</el-menu-item>
          </el-sub-menu>
        </el-menu>
      </div>
    </div>
    <div class="hw-right">
      <div class="r-login">登录</div>
      <div class="r-userCenter">个人中心 →</div>
    </div>
  </div>
</template>
<script setup>
import { ref } from "vue";

const activeIndex = ref("1");
const handleSelect = (key, keyPath) => {
  console.log(key, keyPath);
};
</script>
<style lang="less">
@import "../common/css/base.less";
.header-wrapper {
  width: 100%;
  background: #fff;
  position: fixed;
  left: 0;
  top: 0;
  z-index: 10000;
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 91px;
  box-sizing: border-box;
  padding-left: 18px;
  font-size: 16px;
  box-shadow: 2px 2px 2px #f2f2f2;
  .hw-left {
    display: flex;
    color: #050038;
    .l-logo {
      width: 104px;
      height: 46px;
      margin-right: 15px;
      img {
        width: 100%;
        height: 100%;
      }
    }
    .l-menu {
      width: 400px;
    }
  }
  .hw-right {
    display: flex;
    align-items: center;
    margin-right: 52px;
    .r-login {
      margin-right: 20px;
      color: #050038;
      cursor: pointer;
    }
    .r-userCenter {
      width: 130px;
      height: 50px;
      line-height: 50px;
      text-align: center;
      border-radius: 24px;
      background: @primary;
      color: #fff;
      cursor: pointer;
    }
  }
  .el-menu--horizontal {
    border-bottom: none;
  }
}
</style>